// Mapper Interface with Annotations
package com.ruoyi.examEthnicity.mapper;

import com.ruoyi.examEthnicity.domain.ExamEthnicity;
import org.apache.ibatis.annotations.*;
import java.util.List;

@Mapper
public interface ExamEthnicityMapper {

    @Select("SELECT * FROM tb_ethnicity WHERE id = #{id}")
    ExamEthnicity selectEthnicityById(Long id);

    @Select("SELECT * FROM tb_ethnicity")
    List<ExamEthnicity> selectEthnicityList();

    @Insert("INSERT INTO tb_ethnicity (name) VALUES (#{name})")
    int insertEthnicity(ExamEthnicity ethnicity);

    @Update("UPDATE tb_ethnicity SET name = #{name } WHERE id = #{id}")
    int updateEthnicity(ExamEthnicity ethnicity);

    @Delete("DELETE FROM tb_ethnicity WHERE id IN (${ids})")
    int deleteEthnicityByIds(@Param("ids") String ids);
}